﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Security;

using Bricks.Component.Utils;
using Bricks.Business.Models;
using Bricks.Business.Models.FlowProcess;
using Bricks.Site.Models;
using Bricks.Business.Data.Repositories.ScheduleManagement;
using System.Xml;
using Bricks.Business.Service;
using Bricks.Business.Models.ScheduleManagement;
using Bricks.Component.Data;
using Bricks.Site.Models.DBViewModel.Contract;
using Bricks.Business.Data.Repositories.Account;
using Bricks.Business.Models.Account;
using Bricks.Business.Data.Repositories.ProjectContract;
using Bricks.Business.Models.ProjectContract;


namespace ChiDao.Business.Service.Impl
{
    [Export(typeof(IEngineeringImageScheduleService))]
    internal class EngineeringImageScheduleService : IEngineeringImageScheduleService
    {
        #region 属性
        [Import]
        protected IEngineeringImageStatisticsItemRepository EngineeringImageStatisticsItemRepository { get; set; }
        [Import]
        protected IEngineeringImageScheduleRepository EngineeringImageScheduleRepository { get; set; }
        [Import]
        protected IEngineeringImageScheduleDetailsRepository EngineeringImageScheduleDetailsRepository { get; set; }
        [Import]
        protected IUserInfoRepository UserInfoRepository { get; set; }
        [Import]
        protected IProjectInfoRepository ProjectInfoRepository { get; set; }
        #endregion

        public class TempModel
        {
            //统计项ID
            public Guid EngineeringImageStatisticsItemID { get; set; }

            //本月实际完成工程量:可用于本月计划、本年累计以及开工累计
            public double? EngineeringNum { get; set; }
        }

        public IQueryable<EngineeringImageSchedule> EngineeringImageSchedules
        {
            get { return EngineeringImageScheduleRepository.Entities; }
        }

        public List<EngineeringImageScheduleView> GetEngineeringImageScheduleList(Guid projectID, string contractType, Guid contractID)
        {
            List<EngineeringImageScheduleView> lstDataView = new List<EngineeringImageScheduleView>();
            var queryData = from e in EngineeringImageScheduleRepository.Entities
                            where e.ProjectID == projectID && e.ContractType == contractType && e.ContractID == contractID
                            orderby e.Year, e.Month descending
                            select e;

            foreach (var item in queryData)
            {
                EngineeringImageScheduleView engineeringImageScheduleView = new EngineeringImageScheduleView();
                engineeringImageScheduleView.ID = item.ID;
                engineeringImageScheduleView.FlowCode = item.FlowCode;
                engineeringImageScheduleView.ProjectID = item.ProjectID;
                engineeringImageScheduleView.Year = item.Year;
                engineeringImageScheduleView.Month = item.Month;
                engineeringImageScheduleView.StatisticalCycle = item.Year + "年" + item.Month + "月";
                engineeringImageScheduleView.RequestPersonName = item.RequestPerson;
                UserInfo userInfo = UserInfoRepository.Entities.SingleOrDefault(u => u.UserName == item.RequestPerson);
                if (userInfo != null)
                {
                    engineeringImageScheduleView.RequestPersonName = userInfo.RealName;
                }
                engineeringImageScheduleView.RequestDateStr = item.RequestDate.ToString("yyyy-MM-dd hh:mm:ss");
                engineeringImageScheduleView.LastUpdateTimeStr = item.LastUpdateTime.ToString("yyyy-MM-dd hh:mm:ss");
                lstDataView.Add(engineeringImageScheduleView);
            }
            return lstDataView;
        }

        public List<EngineeringImageScheduleDetailsView> GetEngineeringImageScheduleDetailList(Guid projectID, string contractType, Guid contractID, string year, string month, Guid pid)
        {
            List<EngineeringImageScheduleDetailsView> lstDataView = new List<EngineeringImageScheduleDetailsView>();

            //获取本年累计完成工程量
            List<TempModel> lstCurrentYearCumulativeCompleted = new List<TempModel>();
            var CurrentYearCumulativeCompletedMoneyNum = from e in EngineeringImageSchedules
                                                         join ed in EngineeringImageScheduleDetailsRepository.Entities
                                                         on e.ID equals ed.EngineeringImageScheduleID
                                                         where e.ProjectID == projectID && e.ContractType == contractType && e.ContractID == contractID && e.Year == year && e.Month.CompareTo(month) <= 0
                                                         select ed;
            foreach (var item in CurrentYearCumulativeCompletedMoneyNum)
            {
                TempModel exists = lstCurrentYearCumulativeCompleted.SingleOrDefault(t => t.EngineeringImageStatisticsItemID == item.EngineeringImageStatisticsItemID);
                if (exists == null)
                {
                    lstCurrentYearCumulativeCompleted.Add(new TempModel()
                    {
                        EngineeringImageStatisticsItemID = item.EngineeringImageStatisticsItemID,
                        EngineeringNum = item.CurrentMonthCompletedMoneyNum
                    });
                }
                else
                {
                    exists.EngineeringNum = CountEngineeringNumForDetails(item.CurrentMonthCompletedMoneyNum, exists.EngineeringNum);
                }
            }

            EngineeringImageSchedule engineeringImageSchedule = EngineeringImageSchedules.SingleOrDefault(e => e.ID == pid);
            Guid newPID = pid;
            if (engineeringImageSchedule == null)
            {
                //取最近一月的数据
                int yearMonth = Convert.ToInt32(year + month);
                IQueryable<EngineeringImageSchedule> lstEngineeringImageSchedule = EngineeringImageSchedules.Where(e => e.ProjectID == projectID && e.ContractType == contractType && e.ContractID == contractID && e.YearMonth < yearMonth).OrderByDescending(e => e.YearMonth);
                if (lstEngineeringImageSchedule != null && lstEngineeringImageSchedule.Count() > 0)
                {
                    newPID = lstEngineeringImageSchedule.First().ID;
                }
            }

            var lstEngineeringImageScheduleDetails = EngineeringImageScheduleDetailsRepository.Entities.Where(e => e.EngineeringImageScheduleID == newPID).ToList();

            //获取连接查询数据
            var queryData = from s in EngineeringImageStatisticsItemRepository.Entities.ToList()
                            join e in lstEngineeringImageScheduleDetails
                            on s.ID equals e.EngineeringImageStatisticsItemID into joinedEmpTD
                            from tempE in joinedEmpTD.DefaultIfEmpty()

                            join crc in lstCurrentYearCumulativeCompleted
                            on s.ID equals crc.EngineeringImageStatisticsItemID into joinedEmpCRC
                            from tempCRC in joinedEmpCRC.DefaultIfEmpty()

                            where s.ProjectID == projectID
                            orderby s.OrderNo
                            select new
                            {
                                s.StatisticsItemName,
                                s.OrderNo,
                                s.Unit,
                                CurrentYearCumulativeCompletedMoneyNum = tempCRC == null ? null : tempCRC.EngineeringNum,

                                ID = tempE == null ? GuidHelper.NewGuid() : tempE.ID,
                                EngineeringImageScheduleID = pid,
                                EngineeringImageStatisticsItemID = s.ID,
                                TotalDesignMoneyNum = tempE == null ? null : tempE.TotalDesignMoneyNum,
                                CumulativeCompletedMoneyNum = tempE == null ? null : tempE.CumulativeCompletedMoneyNum,
                                CurrentYearPlanCompletedMoneyNum = tempE == null ? null : tempE.CurrentYearPlanCompletedMoneyNum,
                                CurrentMonthCompletedMoneyNum = tempE == null ? null : tempE.CurrentMonthCompletedMoneyNum,
                                CumulativeToCurrentMonthCompletedMoneyNum = tempE == null ? null : tempE.CumulativeToCurrentMonthCompletedMoneyNum,
                                Remark = tempE == null ? string.Empty : tempE.Remark
                            };

            foreach (var item in queryData)
            {
                EngineeringImageScheduleDetailsView engineeringImageScheduleDetailsView = new EngineeringImageScheduleDetailsView();
                engineeringImageScheduleDetailsView.EngineeringImageStatisticsItemName = item.StatisticsItemName;
                engineeringImageScheduleDetailsView.OrderNo = item.OrderNo;
                engineeringImageScheduleDetailsView.Unit = item.Unit;
                engineeringImageScheduleDetailsView.CurrentYearCumulativeCompletedMoneyNum = item.CurrentYearCumulativeCompletedMoneyNum;

                engineeringImageScheduleDetailsView.EngineeringImageScheduleID = item.EngineeringImageScheduleID;
                engineeringImageScheduleDetailsView.EngineeringImageStatisticsItemID = item.EngineeringImageStatisticsItemID;
                engineeringImageScheduleDetailsView.TotalDesignMoneyNum = item.TotalDesignMoneyNum;
                engineeringImageScheduleDetailsView.CumulativeCompletedMoneyNum = item.CumulativeCompletedMoneyNum;
                engineeringImageScheduleDetailsView.CurrentYearPlanCompletedMoneyNum = item.CurrentYearPlanCompletedMoneyNum;
                if (engineeringImageSchedule == null)
                {
                    engineeringImageScheduleDetailsView.ID = Guid.NewGuid();
                    engineeringImageScheduleDetailsView.Remark = string.Empty;
                }
                else
                {
                    engineeringImageScheduleDetailsView.ID = item.ID;
                    engineeringImageScheduleDetailsView.CurrentMonthCompletedMoneyNum = item.CurrentMonthCompletedMoneyNum;
                    engineeringImageScheduleDetailsView.CumulativeToCurrentMonthCompletedMoneyNum = item.CumulativeToCurrentMonthCompletedMoneyNum;
                    engineeringImageScheduleDetailsView.Remark = item.Remark;
                }
                if (engineeringImageScheduleDetailsView.CurrentYearCumulativeCompletedMoneyNum != null && engineeringImageScheduleDetailsView.CurrentYearPlanCompletedMoneyNum != null && engineeringImageScheduleDetailsView.CurrentYearCumulativeCompletedMoneyNum != 0 && engineeringImageScheduleDetailsView.CurrentYearPlanCompletedMoneyNum != 0)
                {
                    engineeringImageScheduleDetailsView.CurrentYearCumulativeCompletedYearPlanProportion = Math.Round(Convert.ToDecimal(engineeringImageScheduleDetailsView.CurrentYearCumulativeCompletedMoneyNum) * 100 / Convert.ToDecimal(engineeringImageScheduleDetailsView.CurrentYearPlanCompletedMoneyNum), 2).ToString() + "%";
                }
                lstDataView.Add(engineeringImageScheduleDetailsView);
            }

            return lstDataView;
        }

        private double? CountEngineeringNumForDetails(double? engineeringNum, double? totalEngineeringNum)
        {
            if (engineeringNum != null)
            {
                if (totalEngineeringNum == null)
                {
                    totalEngineeringNum = engineeringNum;
                }
                else
                {
                    totalEngineeringNum = totalEngineeringNum + engineeringNum;
                }
            }
            return totalEngineeringNum;
        }

        public EngineeringImageScheduleView GetEngineeringImageScheduleByID(Guid id)
        {
            EngineeringImageSchedule engineeringImageSchedule = EngineeringImageSchedules.SingleOrDefault(t => t.ID == id);
            EngineeringImageScheduleView engineeringImageScheduleView = null;
            if (engineeringImageSchedule != null)
            {
                engineeringImageScheduleView = new EngineeringImageScheduleView();
                engineeringImageScheduleView.ID = engineeringImageSchedule.ID;
                engineeringImageScheduleView.FlowCode = engineeringImageSchedule.FlowCode;
                engineeringImageScheduleView.ProjectID = engineeringImageSchedule.ProjectID;
                engineeringImageScheduleView.ContractType = engineeringImageSchedule.ContractType;
                engineeringImageScheduleView.ContractID = engineeringImageSchedule.ContractID;
                engineeringImageScheduleView.Year = engineeringImageSchedule.Year;
                engineeringImageScheduleView.Month = engineeringImageSchedule.Month;
                engineeringImageScheduleView.StatisticalCycle = engineeringImageSchedule.Year + "年" + engineeringImageSchedule.Month + "月";
                engineeringImageScheduleView.ProblemAndRemark = engineeringImageSchedule.ProblemAndRemark;
                engineeringImageScheduleView.RequestDate = engineeringImageSchedule.RequestDate;
                engineeringImageScheduleView.RequestPerson = engineeringImageSchedule.RequestPerson;
                engineeringImageScheduleView.HandleState = engineeringImageSchedule.HandleState;
                engineeringImageScheduleView.AssociatedNodeCode = engineeringImageSchedule.AssociatedNodeCode;
                engineeringImageScheduleView.LastUpdateUserDepartment = engineeringImageSchedule.LastUpdateUserDepartment;
                engineeringImageScheduleView.LastUpdateUser = engineeringImageSchedule.LastUpdateUser;
                engineeringImageScheduleView.LastUpdateTime = engineeringImageSchedule.LastUpdateTime;
                engineeringImageScheduleView.SaveState = engineeringImageSchedule.SaveState;
            }
            return engineeringImageScheduleView;
        }

        public void SaveEngineeringImageSchedule(EngineeringImageScheduleView engineeringImageScheduleView, List<EngineeringImageScheduleDetailsView> saveList, bool isUpdateDetails = true)
        {
            EngineeringImageSchedule record = EngineeringImageSchedules.FirstOrDefault(a => a.ID == engineeringImageScheduleView.ID);
            if (record != null)
            {
                Update(record, engineeringImageScheduleView);
            }
            else
            {
                Insert(engineeringImageScheduleView);
            }

            if (isUpdateDetails)
            {
                DeleteDetails(engineeringImageScheduleView.ID);
                foreach (EngineeringImageScheduleDetailsView detailsView in saveList)
                {
                    InsertDetails(detailsView);
                }
            }
        }

        private void Insert(EngineeringImageScheduleView view)
        {
            EngineeringImageSchedule record = new EngineeringImageSchedule()
            {
                ID = view.ID,
                FlowCode = view.FlowCode,
                ProjectID = view.ProjectID,
                ContractType = view.ContractType,
                ContractID = view.ContractID,
                Year = view.Year,
                Month = view.Month,
                YearMonth = Convert.ToInt32(view.Year + view.Month),
                ProblemAndRemark = view.ProblemAndRemark,
                RequestDate = view.RequestDate,
                RequestPerson = view.RequestPerson,
                HandleState = view.HandleState,
                AssociatedNodeCode = view.AssociatedNodeCode,
                LastUpdateUserDepartment = view.LastUpdateUserDepartment,
                LastUpdateUser = view.LastUpdateUser,
                LastUpdateTime = view.LastUpdateTime,
                SaveState = view.SaveState
            };
            EngineeringImageScheduleRepository.Insert(record);
        }

        private void Update(EngineeringImageSchedule record, EngineeringImageScheduleView view)
        {
            record.Year = view.Year;
            record.Month = view.Month;
            record.YearMonth = Convert.ToInt32(view.Year + view.Month);
            record.ProblemAndRemark = view.ProblemAndRemark;
            record.HandleState = view.HandleState;
            record.AssociatedNodeCode = view.AssociatedNodeCode;
            record.LastUpdateUserDepartment = view.LastUpdateUserDepartment;
            record.LastUpdateUser = view.LastUpdateUser;
            record.LastUpdateTime = view.LastUpdateTime;
            record.SaveState = view.SaveState;
            EngineeringImageScheduleRepository.Update(record);
        }

        private void DeleteDetails(Guid pid)
        {
            List<EngineeringImageScheduleDetails> lstEngineeringImageScheduleDetails = EngineeringImageScheduleDetailsRepository.Entities.Where(a => a.EngineeringImageScheduleID == pid).ToList();
            foreach (EngineeringImageScheduleDetails engineeringImageScheduleDetails in lstEngineeringImageScheduleDetails)
            {
                EngineeringImageScheduleDetailsRepository.Delete(engineeringImageScheduleDetails.ID);
            }
        }

        private void InsertDetails(EngineeringImageScheduleDetailsView detailsView)
        {
            EngineeringImageScheduleDetails record = new EngineeringImageScheduleDetails()
            {
                ID = detailsView.ID,
                EngineeringImageScheduleID = detailsView.EngineeringImageScheduleID,
                EngineeringImageStatisticsItemID = detailsView.EngineeringImageStatisticsItemID,
                TotalDesignMoneyNum = detailsView.TotalDesignMoneyNum,
                CumulativeCompletedMoneyNum = detailsView.CumulativeCompletedMoneyNum,
                CurrentYearPlanCompletedMoneyNum = detailsView.CurrentYearPlanCompletedMoneyNum,
                CurrentMonthCompletedMoneyNum = detailsView.CurrentMonthCompletedMoneyNum,
                CumulativeToCurrentMonthCompletedMoneyNum = detailsView.CumulativeToCurrentMonthCompletedMoneyNum,
                Remark = detailsView.Remark
            };
            EngineeringImageScheduleDetailsRepository.Insert(record);
        }

        public OperationResult Delete(Guid id)
        {
            try
            {
                EngineeringImageSchedule record = EngineeringImageSchedules.SingleOrDefault(t => t.ID == id);
                if (record == null)
                    return new OperationResult(OperationResultType.QueryNull, "未找到指定的记录");
                if (record != null)
                {
                    EngineeringImageScheduleRepository.Delete(record);
                }

                string sql = @"DELETE FROM EngineeringImageScheduleDetails WHERE EngineeringImageScheduleID='" + record.ID + "';" +
                              "DELETE FROM BaklogTasks WHERE RecordID='" + record.ID + "';" +
                              "DELETE FROM BaklogTaskTemps WHERE RecordID='" + record.ID + "';" +
                              "DELETE FROM CompleteFlowNodes WHERE RecordID='" + record.ID + "';" +
                              "DELETE FROM FlowGraphNodes WHERE RecordID='" + record.ID + "';" +
                              "DELETE FROM FlowProcessMessages WHERE RecordID='" + record.ID + "';" +
                              "DELETE FROM ProcessedTasks WHERE RecordID='" + record.ID + "';";
                EngineeringImageScheduleRepository.ExeSqlCommon(sql);
                return new OperationResult(OperationResultType.Success, "删除成功", record);
            }
            catch (Exception ex)
            {
                return new OperationResult(OperationResultType.Error, "删除失败:" + ex.Message);
            }
        }

        public EngineeringImageScheduleReportView GetEngineeringImageScheduleListForReport(Guid projectID, string year, string month)
        {
            EngineeringImageScheduleReportView engineeringImageScheduleReportView = new EngineeringImageScheduleReportView();
            engineeringImageScheduleReportView.LstEngineeringImageScheduleDetailsView = new List<EngineeringImageScheduleDetailsView>();

            var lstEngineeringImageStatisticsItem = EngineeringImageStatisticsItemRepository.Entities.Where(e => e.ProjectID == projectID).OrderBy(e => e.OrderNo);
            foreach (var item in lstEngineeringImageStatisticsItem)
            {
                engineeringImageScheduleReportView.LstEngineeringImageScheduleDetailsView.Add(new EngineeringImageScheduleDetailsView()
                {
                    ID = Guid.NewGuid(),
                    EngineeringImageScheduleID = Guid.NewGuid(),
                    EngineeringImageStatisticsItemID =item.ID,
                    EngineeringImageStatisticsItemName = item.StatisticsItemName,
                    OrderNo = item.OrderNo,
                    Unit = item.Unit
                });
            }

            var lstEngineeringImageSchedule = EngineeringImageSchedules.Where(e => e.ProjectID == projectID && e.Year == year && e.Month == month);
            if (lstEngineeringImageSchedule.Count() > 0)
            {
                string sql = "select * from V_ContractInfoes where PID ='" + projectID + "'";
                var listView = DbSqlHelper<VMContractInfo>.SqlQueryCommon(sql);

                foreach (var item in lstEngineeringImageSchedule)
                {
                    VMContractInfo VMContractInfo = listView.SingleOrDefault(c => c.ID == item.ContractID);
                    string contractName = "【已删除标段】";
                    if (VMContractInfo != null)
                    {
                        contractName = VMContractInfo.ContractName;
                    }
                    if (!string.IsNullOrEmpty(item.ProblemAndRemark))
                    {
                        engineeringImageScheduleReportView.ProblemAndRemark += contractName + "：" + item.ProblemAndRemark + "；";
                    }

                    var lstEngineeringImageScheduleDetails = EngineeringImageScheduleDetailsRepository.Entities.Where(e => e.EngineeringImageScheduleID == item.ID);
                    foreach (var subItem in lstEngineeringImageScheduleDetails)
                    {
                        EngineeringImageScheduleDetailsView exists = engineeringImageScheduleReportView.LstEngineeringImageScheduleDetailsView.SingleOrDefault(e => e.EngineeringImageStatisticsItemID == subItem.EngineeringImageStatisticsItemID);
                        exists.TotalDesignMoneyNum = CountEngineeringNumForDetails(subItem.TotalDesignMoneyNum, exists.TotalDesignMoneyNum);
                        exists.CumulativeCompletedMoneyNum = CountEngineeringNumForDetails(subItem.CumulativeCompletedMoneyNum, exists.CumulativeCompletedMoneyNum);
                        exists.CurrentYearPlanCompletedMoneyNum = CountEngineeringNumForDetails(subItem.CurrentYearPlanCompletedMoneyNum, exists.CurrentYearPlanCompletedMoneyNum);
                        exists.CurrentMonthCompletedMoneyNum = CountEngineeringNumForDetails(subItem.CurrentMonthCompletedMoneyNum, exists.CurrentMonthCompletedMoneyNum);
                        exists.CumulativeToCurrentMonthCompletedMoneyNum = CountEngineeringNumForDetails(subItem.CumulativeToCurrentMonthCompletedMoneyNum, exists.CumulativeToCurrentMonthCompletedMoneyNum);
                        if (!string.IsNullOrEmpty(subItem.Remark))
                        {
                            exists.Remark += contractName + "：" + subItem.Remark + "；";
                        }
                    }
                }
            }

            //获取本年累计完成工程量
            List<TempModel> lstCurrentYearCumulativeCompleted = new List<TempModel>();
            var CurrentYearCumulativeCompletedMoneyNum = from e in EngineeringImageSchedules
                                                         join ed in EngineeringImageScheduleDetailsRepository.Entities
                                                         on e.ID equals ed.EngineeringImageScheduleID
                                                         where e.ProjectID == projectID && e.Year == year && e.Month.CompareTo(month) <= 0
                                                         select ed;
            foreach (var item in CurrentYearCumulativeCompletedMoneyNum)
            {
                TempModel exists = lstCurrentYearCumulativeCompleted.SingleOrDefault(t => t.EngineeringImageStatisticsItemID == item.EngineeringImageStatisticsItemID);
                if (exists == null)
                {
                    lstCurrentYearCumulativeCompleted.Add(new TempModel()
                    {
                        EngineeringImageStatisticsItemID = item.EngineeringImageStatisticsItemID,
                        EngineeringNum = item.CurrentMonthCompletedMoneyNum
                    });
                }
                else
                {
                    exists.EngineeringNum = CountEngineeringNumForDetails(item.CurrentMonthCompletedMoneyNum, exists.EngineeringNum);
                }
            }

            ProjectInfo projectInfo = ProjectInfoRepository.Entities.SingleOrDefault(p => p.ID == projectID);
            if (projectInfo != null)
            {
                engineeringImageScheduleReportView.ReportName = "项目名称：" + projectInfo.ProjectName + "          " + year + "年" + month + "月";
            }
            if (!string.IsNullOrEmpty(engineeringImageScheduleReportView.ProblemAndRemark))
            {
                engineeringImageScheduleReportView.ProblemAndRemark = engineeringImageScheduleReportView.ProblemAndRemark.TrimEnd('；');
            }
            foreach (EngineeringImageScheduleDetailsView item in engineeringImageScheduleReportView.LstEngineeringImageScheduleDetailsView)
            {
                TempModel exists = lstCurrentYearCumulativeCompleted.SingleOrDefault(t => t.EngineeringImageStatisticsItemID == item.EngineeringImageStatisticsItemID);
                if (exists != null)
                {
                    item.CurrentYearCumulativeCompletedMoneyNum = exists.EngineeringNum;
                }
                if (item.CurrentYearCumulativeCompletedMoneyNum != null && item.CurrentYearPlanCompletedMoneyNum != null && item.CurrentYearCumulativeCompletedMoneyNum != 0 && item.CurrentYearPlanCompletedMoneyNum != 0)
                {
                    item.CurrentYearCumulativeCompletedYearPlanProportion = Math.Round(Convert.ToDecimal(item.CurrentYearCumulativeCompletedMoneyNum) * 100 / Convert.ToDecimal(item.CurrentYearPlanCompletedMoneyNum), 2).ToString() + "%";
                }
                if (!string.IsNullOrEmpty(item.Remark))
                {
                    item.Remark = item.Remark.TrimEnd('；');
                }
            }

            return engineeringImageScheduleReportView;
        }
    }
}